package com.nkym.wypan.model.resp.socket;

import com.nkym.wypan.model.entity.UserInfo;
import lombok.Data;

import java.io.Serializable;

/**
 * @ClassName UserInfoVO
 * @Author nkym
 * @Date 2023-11-11 11:25
 * @Version 1.0
 */
@Data
public class ChatUserInfoVO implements Serializable {
    private static final long serialVersionUID = -7760142150300321627L;


    /**
     * 用户Id
     */
    private Long userId;

    /**
     * 昵称
     */
    private String nickname;

    /**
     * 头像URL
     */
    private String avatar;



    public static ChatUserInfoVO covert(UserInfo userInfo){
        ChatUserInfoVO vo = new ChatUserInfoVO();

        vo.setUserId(userInfo.getUserId());
        vo.setNickname(userInfo.getNickname());
        vo.setAvatar(userInfo.getAvatar());
        return vo;
    }

}
